#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
 -------------------------------------------------
    File Name:     manage.py.py
    Description:   Enhanced CLI with modular commands for better organization and exception handling
 -------------------------------------------------
 Django's command-line utility for administrative tasks.
"""

import logging
import sys

# Configure logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)


def main():
    """运行管理任务."""
    # os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'TestCommander.settings')
    try:
        # from django.core.management import execute_from_command_line
        from apitesting.core.management import execute_from_command_line
    except ImportError as exc:
        raise ImportError(
            "无法导入apitesting. "
            "你确定它已安装并在你的 PYTHONPATH 环境比哪里中可用吗？"
            "你是否忘记激活环境？"
        ) from exc
    execute_from_command_line(sys.argv)


if __name__ == '__main__':
    main()
